<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Class_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-class_name" class="form-control" name="row[class_name]" type="text"
                   value="{$row.class_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Class_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-class_type" data-rule="required" data-source="School_class_type/index"
                   data-field="name" class="form-control selectpage" placeholder="输入为模糊搜索" name="row[class_type]"
                   type="text" value="{$row.class_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">班主任:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-admin_id" data-rule="required" data-source="auth/admin/index"
                   data-field="nickname" class="form-control selectpage" placeholder="输入为模糊搜索" name="row[admin_id]"
                   type="text" value="{$row.admin_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">课室:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-csmmeet" data-rule="required" data-source="csmmeet/room/index"
                   data-field="name" class="form-control selectpage" placeholder="输入为模糊搜索" name="row[csmmeet_room_id]"
                   type="text" value="{$row.csmmeet_room_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remind')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remind" class="form-control" name="row[remind]" placeholder="0为不通知" value="{$row.remind}"
                   type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择科目:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-Subject_id" data-rule="required" data-source="school_subject/index"
                   data-field="subject_name" class="form-control selectpage" placeholder="输入为模糊搜索"
                   name="row[subject_id]" type="text" value="{$row.subject_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">总课时:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_class_hour" class="form-control" name="row[total_class_hour]" type="text"
                   value="{$row.total_class_hour}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否能请假:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="isleaveList" item="vo"}
                <label for="row[is_leave]-{$key}"><input id="row[is_leave]-{$key}" name="row[is_leave]" type="radio"
                                                         value="{$key}" {in name="key" value="$row.is_leave" }checked{/in}
                    /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">请假扣课时(0为不扣课时):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-class_hour" class="form-control" name="row[class_hour]" value="{$row.class_hour}"
                   type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">请假上限次数(0为不限制):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-leave_limit" class="form-control" name="row[leave_limit]" value="{$row.leave_limit}"
                   type="number">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">班级优惠:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="classdiscountList" item="vo"}
                <label for="row[class_discount]-{$key}"><input id="row[class_discount]-{$key}"
                                                               name="row[class_discount]" type="radio" value="{$key}"
                                                               {in name="key" value="$row.class_discount" }checked{/in}
                    /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">课时一口价(元):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" name="row[price]" value="{$row.price}" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">课时折扣(%):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" class="form-control" name="row[discount]" value="{$row.discount}" type="text">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true" name="row[start_time]" type="text"
                   value="{:$row.start_time?datetime($row.start_time):''}">
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
